<template>
  <div class="banner">
    <div class="banxin">
      <img :src="src" alt="" />
      <a v-if="href" :href="href"></a>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {};
  },
  props: ["src", "href"],
};
</script>
 
<style lang = "less" scoped>
.banner {
  position: relative;
  img {
    width: 100%;
  }
  a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }
}
</style>